<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>网点管理</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  #parse('/headFiles.html')
</head>
<body>
<div class="layui-fluid layui-form" wid100>
  <input type="hidden" name="placeId" value="$!{placeId}"/>
  <div class="layui-form-item">
    <label class="layui-form-label">设备批次</label>
    <div class="layui-input-block">
      <select id="batchId" name="batchId" class="layui-hide" lay-ignore></select>
    </div>
  </div>
  <div class="layui-form-item">
	<div class="layui-input-block">
  		<p class="layui-badge">已部署设备不会被再次部署</p>
	</div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">部署策略</label>
    <div class="layui-input-block">
      <select name="strategyType">
		<option value="1">部署与网点一致的代理设备</option>
        <option value="2">部署与网点一致或空的代理设备</option>
		<option value="3">强制修改所属人并部署设备</option>
      </select>
    </div>
  </div>
  <div class="layui-form-item">
  	<label class="layui-form-label">部署起始位</label>
  	<div class="layui-input-block">
		<input type="text" name="setStartNum" placeholder="必填项" lay-verify="required"  autocomplete="off" class="layui-input" value="$!{setStartNum}">
  	</div>
  </div>
  <div class="layui-form-item">
	<label class="layui-form-label">部署数量</label>
	<div class="layui-input-block">
		<input type="text" name="setTotal" placeholder="必填项" lay-verify="required"  autocomplete="off" class="layui-input" value="$!{setTotal}">
	</div>
  </div>
  <div class="layui-form-item layui-hide">
    <input type="button" lay-submit lay-filter="LAY-form-submit" id="LAY-form-submit" value="确认">
  </div>
</div>
#parse('/footFiles.html')
<script>
layui.config({
  base: '$!{webRoot}/layuiadmin/'
  ,webRoot:'$!{webRoot}'
  ,resDomain:'$!{resDomain}'
}).extend({
  index: 'lib/index'
}).use(['index', 'form'],function (){
  var $ = layui.$,form = layui.form;

  $('#batchId').select2({
    placeholder: "请选择设备批次",
    width: '250px',
    theme: 'bootstrap',
    allowClear : true,
    ajax: {
      url: layui.setter.webRoot + '/device/produce/batch/select.data',
      method: 'post',
      delay: 250,
      processResults: function (result) {
        if (result.code == 200) {
          return {
            pagination: {more: result.body.more},
            results: result.body.data || []
          };
        } else {
          return {results: []};
        }
      }
    }
  });
})
</script>
</body>
</html>